<template>
  <div>
    <!-- 标题 -->
    <el-row type="flex" justify="start">
      <el-col>
        <h2>
          <span class="shape"></span>
          新增短信
        </h2>
      </el-col>
    </el-row>

    <!-- 主体 -->
    <el-card>
      <el-form ref="form" :model="form" label-width="100px">
        <el-form-item label="选择模板：">
          <el-select v-model="form.tpl" placeholder="请选择">
            <el-option label="区域一" value="shanghai"></el-option>
            <el-option label="区域二" value="beijing"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="短信内容：">
          <el-input
            type="textarea"
            placeholder="0/100"
            height="100"
            maxlength="100"
            resize="none"
            v-model="form.person"
          ></el-input>
        </el-form-item>
        <el-form-item label="接收人：">
          <el-input
            type="textarea"
            resize="none"
            maxlength="100"
            v-model="form.person"
          ></el-input>
        </el-form-item>
        <el-form-item>
          <el-button style="background: #2bb290; color: white">发送</el-button>
          <el-button @click="cancel">取消</el-button>
        </el-form-item>
      </el-form>
    </el-card>
  </div>
</template>

<script>
export default {
  props: {
    flag: {
      type: Boolean,
      default: false,
    },
  },
  data() {
    return {
      form: {},
    };
  },
  methods: {
    cancel() {
      this.$emit("update:flag", true);
    },
  },
};
</script>

<style lang="scss" scoped>
.shape {
  display: inline-block;
  width: 5px;
  height: 16px;
  margin-right: 5px;
  background: #517dc8;
}
</style>
